﻿#ifndef QOMAIN_H
#define QOMAIN_H

/**
* @file qomain.h
* @describe Qo主程序
* @author gaoyuelong
* @date 2021/11/23
*/

#include <QWidget>
#include <QListWidgetItem>
#include <QTreeWidgetItem>
#include <QSystemTrayIcon>
#include <qochatwidget.h>

namespace Ui {
class QoMain;
}

class QoMain : public QWidget
{
    Q_OBJECT

public:
    explicit QoMain(QWidget *parent = nullptr);
    ~QoMain() override;

    void init();
    void initMessagesList();
    void initFriendsList();

    void closeEvent(QCloseEvent *pEvent) override;

private slots:
    void on_btnMessages_clicked();

    void on_btnFriends_clicked();

    void iconActivated(QSystemTrayIcon::ActivationReason reason);

    void on_treeWgtFriends_itemDoubleClicked(QTreeWidgetItem *item, int column);

    void on_btnOption_clicked();

    void on_btnAddFirend_clicked();

    void showSettingPage();
    void quitQo();

private:
    Ui::QoMain *ui;
    //QoChatWidget *m_pChatwidget;

    QSystemTrayIcon *m_pTrayIcon;

    QTreeWidgetItem *m_pTreeWgtItemGroup;//群组
    QTreeWidgetItem *m_pTreeWgtItemFriends;//好友


};

#endif // QOMAIN_H
